<!DOCTYPE html>
<html lang="en" xmlns:v-bind="http://www.w3.org/1999/xhtml"
      xmlns:v-on="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>大区经理意向客户</title>
    <meta http-equiv="pragma" content="no-cache">
    <meta http-equiv="Cache-Control" content="no-store, must-revalidate">
    <meta http-equiv="expires" content="Wed, 26 Feb 1997 08:21:57 GMT">
    <meta http-equiv="expires" content="-1">
    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"
          name="viewport">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="shortcut icon" href="/dist/img/icon.png" type="image/x-icon">
    <!-- Bootstrap 3.3.6 -->
    <link rel="stylesheet" href="/dist/plugins/bootstrap/css/bootstrap.min.css">
    <!--字体-->
    <link rel="stylesheet" href="/dist/css/font-awesome.min.css">
    <!--图标-->
    <link rel="stylesheet" href="/dist/css/ionicons.min.css">
    <!--插件样式-->
    <link rel="stylesheet" href="/dist/plugins/select2/select2.min.css">
    <link href="/dist/plugins/ztree/css/zTreeStyle/zTreeStyle.css" rel="stylesheet"/>
    <link rel="stylesheet" href="/dist/plugins/webuploader-0.1.5/webuploader.css">
    <!--OA主样式-->
    <link rel="stylesheet" href="/dist/css/OA.min.css?t=39cd89cd">
    <link rel="stylesheet" href="/dist/css/skins/OA-skins.min.css?t=16f1e6f3">
    <style>
        .webuploader-pick {
            padding: 3px 0;
            padding-left: 15px;
            background: none;
        }

        .left {
            width: 180px;
            float: left;
        }

        .right {
            margin-left: 190px;
        }

        .lineF span {
            max-height: 140px;
            line-height: 20px;
            overflow: hidden;
            text-overflow: ellipsis;
            display: -webkit-box;
            -webkit-box-orient: vertical;
            -webkit-line-clamp: 7;
            text-align: left;
        }

        .lineOne {
            text-align: left;
        }

        .lineOne span {
            max-height: 20px;
            line-height: 20px;
            overflow: hidden;
            text-overflow: ellipsis;
            display: -webkit-box;
            -webkit-box-orient: vertical;
            -webkit-line-clamp: 1;
            text-align: left;
        }

        .div-td-content-more {
            position: absolute;
            height: auto;
            z-index: 999;
            line-height: 20px;
            background-color: #d3e8fd;
            padding: 8px 6px;
            border: 1px solid #e8e8ea;
            display: none;
        }

        .div-td-content-more i {
            width: 15px;
            height: 12px;
            background: url("/dist/img/more-icon.png");
            position: absolute;
            left: 50px;
            top: -12px;
        }

        .moduleName {
            float: left;
            height: 27px;
            line-height: 27px;
            font-size: 22px;
            width: 100px;
            text-align: center;
        }

        .tryStyle {
            width: 30px;
            height: 14px;
            line-height: 14px;
            font-size: 12px;
            /* top: 0; */
            right: 0;
            position: absolute;
            border-radius: 5px;
            margin-top: 1px;
            background: red;
            color: #fff;
            margin-right: -2px;
            transform: scale(0.8);
        }

        .nav-tabs-custom {
            padding: 10px;
            margin-bottom: 0;
            box-shadow: none;
            position: relative;
            overflow: hidden;
        }

        .infoReport {
            display: flex;
            justify-content: flex-start;
            text-align: left;
            margin-left: 10px;
        }

        .infoReport div {
            margin: 0 10px;
        }

        .lineOne {
            text-align: left;
        }

        .lineOne span {
            max-height: 20px;
            line-height: 20px;
            overflow: hidden;
            text-overflow: ellipsis;
            display: -webkit-box;
            -webkit-box-orient: vertical;
            -webkit-line-clamp: 1;
            text-align: left;
        }

        .lineOneNoMore {
            text-align: left;
        }

        .lineOneNoMore span {
            max-height: 20px;
            line-height: 20px;
            overflow: hidden;
            text-overflow: ellipsis;
            display: -webkit-box;
            -webkit-box-orient: vertical;
            -webkit-line-clamp: 1;
            text-align: left;
        }

        .mScrollBox {
            float: left;
            position: relative;
        }

        .imgStyle {
            width: 300px;
            height: 400px;
        }

        .div-td-content-more {
            position: absolute;
            height: auto;
            z-index: 999;
            line-height: 20px;
            background-color: #d3e8fd;
            padding: 8px 6px;
            border: 1px solid #e8e8ea;
            display: none;
        }

        .div-td-content-more i {
            width: 15px;
            height: 12px;
            background: url("/dist/img/more-icon.png");
            position: absolute;
            left: 50px;
            top: -12px;
        }

        .templateStyle {
            border: 1px solid #ddd;
        }

        .table > thead > tr > th {
            padding: 0;
        }

        .table > tbody > tr > td {
            position: relative;
        }

        .table > tbody > tr > td {
            height: 30px;
            max-height: 28px;
            overflow: hidden;
        }

        .jiaobiao3 {
            position: relative;
        }

        .jiaobiao3 i {
            display: block;
            width: 6px;
            height: 6px;
            background: url("/dist/img/newLog3.png");
            position: absolute;
            top: 0px;
            right: 0px;
        }
    </style>
</head>
<body>
<section class="content" id="app" v-cloak>
    <div class="div-td-content-more"><i></i></div>
    <iframe id="ifExprot" style="width:0px;height:0px;display: none;" frameborder="0"></iframe>
    <div>
        <div class="row">
            <div class="left" id="inboxGroup" id="divLeft" v-if="roleName!='区域经理'">
                <div class="box-body no-padding box-border iframeH2"
                     style="overflow-y: auto;background: #f7f8fa;">
                    <ul class="ztree" id="ztree"></ul>
                </div>
            </div>
            <div :class="roleName!='区域经理'?'right':''">
                <div class="templateStyle iframeH2" style="overflow-y: auto;">
                    <div style="    margin: 10px;height: 25px;">
                        <input type="text" placeholder="关键字" class="form-control pull-left input-sm"
                               style="width: 165px;"
                               v-model="key">
                        <button type="button" class="btn oaBtn btn-sm pull-left"
                                style="margin-left: 10px;height: 25px;"
                                @click="getCustomersByUserIds">查询
                        </button>
                       <!-- <input type="button" class="btn oaBtn btn-sm pull-right" v-if="userId=='201711271733404C9DA1461F2421F828'"
                               style="margin-right:5px;height: 25px" value="导出客户信息"
                               @click="exportGet()"/>-->
                    </div>
                    <div style="padding: 0 10px;background: #fff;" id="customersGroup">
                        <div style="width: 100%;" class="mScrollBox">
                            <table class="table table-hover table-bordered text-center table-striped">
                                <thead>
                                <tr>
                                    <!--   <td style="width:14px;" v-if="roleName!='区域经理'">
                                           <input type="checkbox" id="checkAll" v-model="isCheckedAll"/>
                                       </td>-->
                                    <th style="width: 27px;">序号</th>
                                    <th style="width: 56px;">区域经理</th>
                                    <th style="width: 51px;">客户姓名</th>
                                    <th style="width: 91px;">客户电话</th>
                                    <th style="width: 64px;">客户类型</th>
                                    <th style="width: 50px;">客户信用</th>
                                    <th style="width: 85px;">客户所在地</th>
                                    <th style="width: 55px;">购买时间</th>
                                    <th style="width: 60px;">意向机型</th>
                                    <th style="width: 55px;">购买方式</th>
                                    <th style="width: 75px;">本月成交概率</th>
                                    <th style="width: 96px;">商机确认日期</th>
                                    <th> 基本情况</th>
                                </tr>
                                </thead>
                                <tbody>
                                <template v-if="customer.list.length>0">
                                    <tr v-for="(item,i) in customer.list">
                                        <td>{{i+nowPage+1}}</td>
                                        <td>{{item.createUserName}}</td>
                                        <td @click="goDetail(item.customerId,item.createUserId,'look',0)"
                                            :class="(item.tel==''||item.wechat==''||item.customerType==''||item.customerCredit==''||item.customerlocation==''||item.birthday==''||item.existingDevice==''||item.otherCondition=='')?'jiaobiao3':''">
                                            <i></i><span
                                                style="text-align:center;color:#169BD5;cursor: pointer; ">{{item.customerName}}</span>
                                        </td>
                                        <td>{{item.tel}}</td>
                                        <td>{{item.customerType}}</td>
                                        <td>{{item.customerCredit}}</td>
                                        <td class='td-tanZongStyle-line'>
                                            <span class="lineOne" style="text-align: center;max-height: 24px">{{item.provinceName}}-{{item.cityName}}-{{item.countyName}}</span>
                                        </td>
                                        <td>{{item.buyDate}}</td>
                                        <td>{{item.intentionModel}}</td>
                                        <td>{{item.buyType}}</td>
                                        <td>
                                            {{item.chance}}
                                        </td>
                                        <td>{{item.businessDate}}</td>
                                        <td class="lineOne"><span>{{item.otherCondition}}</span></td>
                                    </tr>
                                </template>
                                <template v-else>
                                    <tr>
                                        <td colspan="13">暂无数据</td>
                                    </tr>
                                </template>
                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</section>
<script src="https://file.ggxqce.com/web/jquery-2.2.3.min.js"></script>
<!--插件JS-->
<script src="https://file.ggxqce.com/web/bootstrap.min.js"></script>
<!--框架已定义 JS-->
<script src="/dist/js/app_iframe.js?t=8e743a31"></script>
<!--oa自定义  JS-->
<script src="/dist/js/oa.js?t=54c6b89c"></script>
<script src="https://file.ggxqce.com/web/vue.min.js"></script>
<script type="text/javascript" src="/dist/plugins/My97DatePicker/WdatePicker.js"></script>
<script type="text/javascript" src="/dist/plugins/lhgdialog/lhgdialog.min.js?self=true"></script>
<!--ztree组件所需js-->
<script type="text/javascript" src="/dist/plugins/ztree/js/jquery.ztree.all-3.5.min.js"></script>
<script type="text/javascript" src="/dist/plugins/ztree/js/jquery.ztree.exhide-3.5.js"></script>

<script src="/dist/plugins/webuploader-0.1.5/webuploader.min.js"></script>
<script type="text/javascript">
    var zTreeCallback = {
        showIcon: function (treeId, treeNode) {
            return treeNode.isParent;
        },
        onClick: function (event, treeId, treeNode) {
            if (treeNode.type == "root") {
                app.checkCompanyId = treeNode.id;
            }else {
                app.checkCompanyId=''
            }

            if (treeNode.type == 'user') {
                app.key = ''
                app.allUserIdList = treeNode.id
            } else {
                app.key = ''
                function filter(node) {
                    if (node.type == 'user') {
                        return true;
                    }
                }

                var newList = []
                var treeObj = $.fn.zTree.getZTreeObj("ztree");
                var nodes = treeObj.getNodesByFilter(filter, false, treeNode); // 查找节点集合
                for (var i = 0; i < nodes.length; i++) {
                    newList.push(nodes[i].id)
                }
                app.allUserIdList = newList.join("','")
            }
            app.getCustomersByUserIds();
        },
        beforeClick: function (treeId, treeNode, clickFlag) {
            // if(treeNode.level==0){
            //      return false;
            //  }
        }
    };
    var zTreeSetting = {
        view: {
            showIcon: zTreeCallback.showIcon
        },
        data: {
            simpleData: {
                enable: true
            },
            keep: {
                parent: true
            }
        },
        callback: {
            onClick: zTreeCallback.onClick,
            beforeClick: zTreeCallback.beforeClick
        }
    };

</script>
<script type="text/javascript">

    $.wyui.page.queryParams.userIds = '';
    $.wyui.page.queryParams.key = '';
    $.wyui.page.queryParams.isIntention = 1;
    $.wyui.page.getByPage_callback = function (data) {
        app.nowPage = ($.wyui.page.queryParams.requestPage - 1) * 30
        app.customer.list = data;
    };
    $.wyui.page.getByPage_scroll_callback = function (list) {
        if (list.length < 30) {
            isLoad = false;
        } else {
            for (var i = 0; i < list.length; i++) {
                app.customer.list.push(list[i]);
            }
            isLoad = true;
        }
        ;
    }
    function refresh() {
        //  app.allUserIdList = [];
        //  app.getTreeData();
        app.getCustomersByUserIds();
        app.importExcel();
    }
    $(function () {
        $("body").on("click", ".lineOne,.lineTwo,.lineF", function (e) {
            if ($(".div-td-content-more").is(":hidden")) {
                var text = $(this).text();
                if (text != "") {
                    text = "<i></i>" + text;
                    $(".div-td-content-more").html(text).css({
                        "width": $(this).outerWidth() + "px",
                        "left": $(this).offset().left,
                        "top": ($(this).offset().top + $(this).outerHeight()) + "px"
                    }).show();
                    e.stopPropagation();
                }
            } else {
                $(".div-td-content-more").hide();
            }
        });
        $("body").on("click", ".div-td-content-more", function (e) {
            e.stopPropagation();
        });
        $("body").on("click", function () {
            $(".div-td-content-more").hide();
        });
    });

    var app = new Vue({
        el: '#app',
        data: {
            checkCompanyId:'0',//选中公司Id
            isIntention: 1,//是否为意向客户
            isCheckNew: false,
            nowPage: 0,
            allUserIdList: [],
            userIdsSelect: [],
            userId: getCurrentUser().id,
            roleName: getCurrentUser().roleName,
            companyId: getCurrentUser().companyId,
            frontFlag: getCurrentUser().frontFlag,
            departId: getCurrentUser().departId,
            modules: [],//该人员拥有的模块列表,
            reginIds: [],//该人员拥有的区域列表ID
            regionNames: [],//该人员拥有的区域列表名称
            yesterday: new Date(new Date() - 24 * 60 * 60 * 1000).Format("yyyy-MM-dd"),
            today: new Date().Format("yyyy-MM-dd"),//今天
            hour: new Date().getHours(),
            thisMonth: new Date().Format("yyyy-MM"),
            thisWeek: new Date().Format("yyyy-MM-dd") + "-w",
            tab: [],
            list: [],
            key: '',
            front: 0,
            isCheckedAll: false,
            selectIds: [],
            customer: {
                id: '',
                name: '',
                tel: '',
                wechat: '',
                birthday: '',
                idCard: '',
                provinceName: '',
                cityName: '',
                countyName: '',
                source: '',
                intentionModel: '',
                buyType: '',
                fundCondition: '',
                existingDevice: '',
                OtherCondition: '',
                time: new Date().Format("yyyy-MM-dd"),
                list: [],
                weekNumCount: '',
                monNumCount: '',
                moreNumCount: '',
                allNumCount: '',
                customerName: '',
                throwFlag: '',
                throwReason: '',
                intentionFlag: ''
            },
        },
        watch: {
            isCheckedAll: function (isCheck) {
                this.isCheckNew = isCheck;
                if (isCheck) {
                    for (var i = 0; i < this.customer.list.length; i++) {
                        var item = this.customer.list[i];
                        item.checked = this.isCheckedAll;
                        this.selectIds.push(item.customerId);
                    }

                } else {
                    this.selectIds = [];
                    for (var i = 0; i < this.customer.list.length; i++) {
                        var item = this.customer.list[i];
                        item.checked = this.isCheckedAll;
                    }
                }
            }
        },
        methods: {
            goDetail: function (customerId, createUserId, pageType, isAdd) {
                var that = this;
                var H = $(window).height() - 50;
                if (!((createUserId) == (getCurrentUser().id))) {
                    pageType = 'look';
                }
                $.dialog({
                    content: 'url:/page/intentionManagement/intentCustomerPc/quYuIntentionalDetail.html?pageType=' + pageType + "&customerId=" + customerId + "&userId=" + getCurrentUser().id + "&isAdd=" + isAdd,
                    title: '意向客户详情',
                    width: 400,
                    height: H,
                    max: true,
                    min: true,
                    lock: true
                });
            },
            //批量修改客户所在地
            goSetProvince: function () {
                var that = this;
                var H = $(window).height() - 50;
                console.log(that.selectIds.length)


                $.dialog({
                    content: 'url:/page/customerReport/customerProvince.html?selectIds=' + that.selectIds.join("','") + "&userIds=" + that.allUserIdList + "&key=" + that.key + "&type=" + that.isCheckNew,
                    title: '批量修改客户所在地',
                    width: 400,
                    height: H,
                    max: true,
                    min: true,
                    lock: true
                });

            },
            //获取树
            getTreeData: function () {
                var that = this;
                $.wyui.postMethod(urlConfig.intentionCustomerManagement.reportDayTree,{
                    userId:that.userId
                }, function (nodes) {
                    console.log("aaa")
                    console.log(nodes)
                    for (var i = 0; i < nodes.length; i++) {
                        if (nodes[i].type == 'root'||nodes[i].type == 'company') {
                            nodes.splice(i, 1);
                        }
                    }
                    /*获取所有区域经理的ID*/
                    for (var i = 0; i < nodes.length; i++) {
                        if (nodes[i].type == 'user') {
                            that.allUserIdList.push(nodes[i].id);
                        }
                    }
                    that.userIdsSelect = that.allUserIdList.join("','");
                    that.allUserIdList = that.allUserIdList.join("','");
                    that.treeObj = $.fn.zTree.init($("#ztree"), zTreeSetting, nodes);
                    var getNode = that.treeObj.getNodeByParam('type', 'depart', null);
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    that.treeObj.expandAll(true);
                    console.log(getNode)
                    if (getNode) {
                        that.treeObj.selectNode(getNode);
                        that.getCustomersByUserIds();
                    }

                });
            },
            getCustomersByUserIds: function () {
                var that = this;
                var userIds='';
                if (that.allUserIdList.length > 0) {
                   userIds = that.allUserIdList;
                }
                $.wyui.postMethod(urlConfig.intentionCustomerManagement.getIntentCustomerListByUserIds, {
                        "userIds": userIds,
                         "key":that.key
                    }, function (data) {
                    that.customer.list=data.records;
                });

            },
            getCustomersByKey: function () {
                var that = this;
                $.wyui.page.queryParams.requestPage = 1;
                $.wyui.page.queryParams.isIntention = that.isIntention;
                $.wyui.page.queryParams.key = that.key;
                $.wyui.page.queryParams.userIds = '';
                if (that.userIdsSelect.length > 0) {
                    $.wyui.page.queryParams.userIds = that.userIdsSelect;
                }
                $.wyui.page.getByPage();
            },
            getRegionByUserId: function () {
                var that = this;
                $.wyui.postMethod(urlConfig.report.visitCustomer.getRegionByUserId, {userId: getCurrentUser().id}, function (ids) {
                    for (var i = 0; i < ids.length; i++) {
                        that.reginIds.push(ids[i].regionId);
                    }
//                    console.log(that.reginIds)
                }, true);
            },
            //合并单元格
            tablesMergeCell: function (list) {
                for (field in list[0]) {
                    var k = 0;
                    while (k < list.length) {
                        list[k][field + 'span'] = 1;
                        list[k][field + 'dis'] = false;
                        for (var i = k + 1; i <= list.length - 1; i++) {
                            if (list[k][field] == list[i][field] && list[k][field] != '') {
                                list[k][field + 'span']++;
                                list[k][field + 'dis'] = false;
                                list[i][field + 'span'] = 1;
                                list[i][field + 'dis'] = true;
                            } else {
                                break;
                            }
                        }
                        k = i;
                    }
                }
                return list;
            },
            //获取合计
            getCount: function (arr, key) {
                var number = 0;
                for (var i = arr.length - 1; i >= 0; i--) {
                    number += (arr[i][key] && arr[i][key] != '-' ? arr[i][key] : 0)

                }
                return number;
            },
            isCheck: function (item) {
                var that = this;
                if (that.isHasRightOp(item.regionId)) {
                    return true
                } else if (item.regionId == '') {
                    return true;
                }
                else {
                    return false
                }
            },
            isHasRightOp: function (regionId) {
                //console.log($.inArray(regionId, this.reginIds) > -1)
                return $.inArray(regionId, this.reginIds) > -1;
            },
            exportGet: function () {
                var that = this;
                var userIds = ''
                if (that.checkCompanyId=='0'){
                    alert("无法导出集团,请选择公司及其以下级别！")
                    return false;
                }
                if (that.allUserIdList.length > 0) {
                    userIds = that.allUserIdList;
                }
                console.log(userIds,
                    that.key,
                    that.isIntention
                )
                $('#ifExprot').attr('src', server.ip
                    + "/allCustomerReport/getDownByCondition.json"
                    + '?userIds=' + userIds
                    + '&key=' + that.key
                    + '&isIntention=' + that.isIntention
                )
                ;
                return false;
            },
            importExcel: function () {
                var that = this;
                setTimeout(function () {
                    $(".fj").each(function () {
                        var demo = $(this);
                        var uploader = WebUploader.create({
                            // 选完文件后，是否自动上传。
                            auto: true,
                            // swf文件路径
                            swf: "/statics/plugin/webuploader-0.1.5/Uploader.swf",
                            // 文件接收服务端。
                            server: server.ip + "/importExcel/customerFile.json",
                            // 选择文件的按钮。可选。
                            // 内部根据当前运行是创建，可能是input元素，也可能是flash.
                            pick: '#' + demo.attr("id"),
                            duplicate: true,
                            formData: {createUserId: that.userId}
                        });
                        // 文件上传过程中创建进度条实时显示。
                        uploader.on('uploadProgress', function (file, percentage) {
                            var $li = $('#' + file.id),
                                $percent = $li.find('.progress span');
                            // 避免重复创建
                            if (!$percent.length) {
                                $percent = $('<p class="progress"><span></span></p>')
                                    .appendTo($li)
                                    .find('span');
                            }
                            $percent.css('width', percentage * 100 + '%');
                        });
                        uploader.on("uploadStart", function () {
                            $("#progress").show();
                        });
                        uploader.on("uploadComplete", function () {
                            $("#progress").hide();
                        });
                        // 文件上传成功，给item添加成功class, 用样式标记上传成功。
                        uploader.on('uploadSuccess', function (file, response) {
                            console.log(file)
                            console.log(JSON.parse(response._raw).e.desc)
                            if(JSON.parse(response._raw).e.desc=='noTel'){
                                alert("新增客户失败，区域经理姓名或电话错误！");
                            }else {
                                alert("上传成功！");
                            }
                            that.getCustomersByUserIds();
                        });

                        // 文件上传失败，显示上传出错。
                        uploader.on('uploadError', function (file) {
                            alert("上传失败！");
                        });
                    });
                }, 10);
            },
            isEnable: function (item) {
                return true;
            },
            checked: function (item) {
                var that = this;
                if ($.inArray(item.customerId, that.selectIds) > -1) {
                    // 如果已经包含了该id, 则去除(单选按钮由选中变为非选中状态)
                    console.log(that.selectIds.length)
                    for (var i = 0; i < that.selectIds.length; i++) {
                        if (that.selectIds[i] == item.customerId) {
                            that.selectIds.splice(i, 1);
                            console.log(that.selectIds)
                        }
                    }
                } else {
                    // 选中该checkbox
                    that.selectIds.push(item.customerId)
                }
            },
            isArray: function (id) {
                var that = this;
                if ($.inArray(id, that.selectIds) > -1) {
                    // 如果已经包含了该id, 则去除(单选按钮由选中变为非选中状态)
                    return true;
                } else {
                    // 选中该checkbox
                    return false;
                }
            },

        },
        mounted: function () {
            var that = this;
            that.getTreeData();
//            that.importExcel();

        }
    });
    function selectAll() {
        var isCheck = $("#sel_1").is(':checked');  //获得全选复选框是否选中
        $("input[type='checkbox']").each(function () {
            this.checked = isCheck;       //循环赋值给每个复选框是否选中
        });
    };

</script>
<script>
    /************************滚动加载******************************/
    /* var divscroll = document.getElementById('scrollDiv');*/

    function divScroll() {
        var wholeHeight = divscroll.scrollHeight;
        var scrollTop = divscroll.scrollTop;
        var divHeight = divscroll.clientHeight;
        console.log(scrollTop + divHeight, wholeHeight)
        if (scrollTop + divHeight >= wholeHeight - 2) {
//            alert('滚动到底部了！');
            if (isLoad) {
                isLoad = false;
                setTimeout($.wyui.page.getByPage("scroll"), 1000);
            }
            //这里写动态加载的逻辑，比如Ajax请求后端返回下一个页面的内容
        }

    }
    /*divscroll.onscroll = divScroll;*/
</script>
</body>
</html>